package de.home.spring.services;

import java.util.List;

import de.home.spring.backend.IDAO;
import de.home.spring.beans.Person;
import de.home.spring.helper.ContextHolder;

public class PersonService {
	
	public static void writePerson(Person person) {
		IDAO<Person> personDAO = ContextHolder.getPersonDAO();
		personDAO.write(person);
	}
	
	public static void writePersons(List<Person> personList) {
		IDAO<Person> personDAO = ContextHolder.getPersonDAO();
		for(Person p: personList) {
			personDAO.write(p);
		}
	}

}
